package com.wuyu.easyid.server.controller;

import com.wuyu.easyid.server.service.id.IdGeneratorServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/id")
public class IdController {

    @Autowired
    private IdGeneratorServer idGeneratorServer;

    @RequestMapping("/getId")
    public Long getId(Integer bizType) {
        return idGeneratorServer.getIdGenerator(bizType).getNextId();
    }

}
